package com.estore.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.estore.info.ShopInfo;

public class ShopInfoMapper implements RowMapper<ShopInfo> {

	@Override
	public ShopInfo mapRow(ResultSet rs, int arg1) throws SQLException {
		ShopInfo info = new ShopInfo();
		info.setAgentName(rs.getString("agentname"));
		info.setAgentID(rs.getInt("agentID"));
		info.setUserID(rs.getInt("userid"));
		info.setAddress(rs.getString("address"));
		info.setPhoneNumber(rs.getString("phonenumber"));
		info.setAgentEmail(rs.getString("agentemail"));
		info.setAgentWebsite(rs.getString("agentwebsite"));
		info.setStartDate(rs.getString("startdate"));
		info.setStatus(rs.getString("status"));
		info.setLogo(rs.getString("logo"));
		return info;
	}

}
